﻿<?xml version="1.0" encoding="utf-8"?>
<deploymentModel>
  <!-- Begin : Define users and groups for this application -->
  <usersAndGroups>
    <usersAndGroup name="DeploymentTo" description="Contacts to inform for managed actions" type="mail">
      <add value="toto@test.fr" environment="DEV" />
      <add value="toto@test.fr" environment="UAT" />
      <add value="toto@test.fr" environment="PRD" />
    </usersAndGroup>
    <usersAndGroup name="DeploymentCc" description="Contacts to inform for managed actions" type="mail">
      <add value="titi@test.fr" environment="DEV" />
      <add value="titi@test.fr" environment="UAT" />
      <add value="titi@test.fr" environment="PRD" />
    </usersAndGroup>
    <usersAndGroup name="applicationPoolUserForApp1" description="Accound used to the application pool for App1" type="user">
      <add value="Domain\AppPoolUserApp1Dev" password="pwdApp1Dev" environment="DEV" />
      <add value="Domain\AppPoolUserApp1Uat" password="pwdApp1Uat" environment="UAT" />
      <add value="Domain\AppPoolUserApp1Prd" password="pwdApp1Prd" environment="PRD" />
    </usersAndGroup>
    <usersAndGroup name="applicationPoolUserForApp2" description="Accound used to the application pool for App2" type="user">
      <add value="Domain\AppPoolUserApp2Dev" password="pwdApp2Dev" environment="DEV" />
      <add value="Domain\AppPoolUserApp2Uat" password="pwdApp2Uat" environment="UAT" />
      <add value="Domain\AppPoolUserApp2Prd" password="pwdApp2Prd" environment="PRD" />
    </usersAndGroup>
  </usersAndGroups>
  <templates>
    <template name="deploymentConfiguration" type="configuration">
      <configuration>
        <logger outputFolder="d:\temp" archivingFolder="d:\temp\Target" />
        <mailing smtpserver="smtp.yahoo.fr">
          <to value="DeploymentTo" />
          <cc value="DeploymentCc" />
        </mailing>
      </configuration>
    </template>
    <template name="rootFolder" type="folders">
      <folders>
        <folder name="logFolder" value="D:\Logs" share="Logs" allowCreation="false" inheritSecurity="false" type="server">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="tempFolder" value="D:\Temp" allowCreation="false" inheritSecurity="false" type="server">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="toolsFolder" value="D:\Tools" allowCreation="false" inheritSecurity="false" type="server">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="sourcesFolder" value="D:\sources" share="Sources" allowCreation="false" inheritSecurity="false" type="server">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="backupFolder" value="D:\backup" share="backup" allowCreation="false" inheritSecurity="false" type="application">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="workdirFolder" value="D:\sources\Delivery\Workdir" share="Sources\Delivery\Workdir" allowCreation="false" inheritSecurity="false" type="application">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="deliveryFolder" value="D:\sources\Delivery\Workdir" share="Sources\Delivery\Workdir" allowCreation="false" inheritSecurity="false" type="application">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="logApplicationFolder" value="D:\Logs\AppLogs" type="application">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
      </folders>
    </template>
    <template name="ApplicationPoolForApp1" type="applicationPool">
      <applicationPool deploymentTemplateName="myAppPool1.xml" runtime="64 bits">
        <security>
          <add name="applicationPoolUserForApp1" />
        </security>
      </applicationPool>
    </template>
    <template name="ApplicationPoolForApp2" type="applicationPool">
      <applicationPool deploymentTemplateName="myAppPool2.xml" runtime="32 bits">
        <security>
          <add name="applicationPoolUserForApp2" />
        </security>
      </applicationPool>
    </template>
    <template name="IISMiddleware" type="middleware">
      <middleware type="IIS7">
        <applicationPools>
          <applicationPool applicationPoolName="AppPool1" template="ApplicationPoolForApp1" deploymentTemplateName="myAppPool11.xml" />
          <applicationPool applicationPoolName="AppPool2" template="ApplicationPoolForApp2"  />
        </applicationPools>
        <executionContainer name="WEBSITENAME1" ipListener="127.0.0.1" iislogFolder="d:\logs">
          <folders>
            <folder name="rootFolder" value="d:\PlaceHolder.InetPub\WEBSITENAME1" />
          </folders>
          <bindings>
            <binding protocol="http" ssl="true" port="443" />
          </bindings>
        </executionContainer>
        <executionContainer name="WEBSITENAME2" ipListener="127.0.0.2" iislogFolder="d:\logs">
          <bindings>
            <binding protocol="http" ssl="true" port="443" />
          </bindings>
          <folders>
            <folder name="rootFolder" value="d:\PlaceHolder.InetPub\WEBSITENAME2" />
          </folders>
        </executionContainer>
      </middleware>
    </template>

    <template name="iisServer" type="server">
      <server os="W2K8R2" cluster="false" winrmUseSSL="true" winrmPort="5986">
        <folders template="rootFolder" />
        <middlewares>
          <middleware template="IISMiddleware" />
        </middlewares>
      </server>
    </template>
  </templates>
  <servers>
    <server name="localhost" template="iisServer" zone="SecretFront" />
    <server name="localhost3" template="iisServer" zone="SecretFront" />
    <server name="localhost2" template="iisServer" zone="SecretFront" />
  </servers>
  <applications>
    <application name="Application1" version="1.0" friendlyName="My Beautifull application">
      <components>
        <!-- Frontend UI  -->
        <component name="Frontweb" componentName="Frontweb" version="1.0" componentType="WebApplicationIIS7" middlewareTarget="IIS7" alias="/V1.0" packageName="PlaceHolder.Frontweb"
                   deploymentSteps="Inventory;Install">
          <relativeAttributes>
            <installationDirectory relativeValue="v1.0\http.Front" targetedName="rootFolder" targetedType="folder" targetedAttribute="value" separator="\" parent="middleware" />
            <applicationPath relativeValue="V1.0" targetedName="executionContainer" targetedType="executionContainer" targetedAttribute="name" separator="/" parent="middleware" />
            <logComponentDirectory relativeValue="launcher" targetedName="logApplicationFolder" targetedType="folder" targetedAttribute="value" separator="\" parent="server" />
          </relativeAttributes>
          <interfaces>
            <interface type="Oracle" name="MainComponentDatabase" />
            <interface type="WCF" name="CustomerServices" />
          </interfaces>
        </component>
      </components>
    </application>
  </applications>
  <deploymentTargets>
    <deploymentTarget environment="DEV" applicationName="Application1" version="1.0">
      <configuration template="deploymentConfiguration" />
      <deploymentNode nodeName="localhost" serverName="localhost">
        <component name="Frontweb" middlewareTarget="WEBSITENAME1" applicationPoolTarget="AppPool1" />
        <component name="Frontweb" middlewareTarget="WEBSITENAME2" applicationPoolTarget="AppPool2" />
      </deploymentNode>
      <deploymentNode nodeName="localhost-rep" serverName="localhost2">
        <component name="Frontweb" middlewareTarget="WEBSITENAME2" applicationPoolTarget="AppPool1" />
      </deploymentNode>
    </deploymentTarget>
    <deploymentTarget environment="UAT" applicationName="Application1" version="2.0" >
      <configuration template="deploymentConfiguration" />
      <deploymentNode nodeName="TestDeployProducts" serverName="localhost">
        <component name="Frontweb" middlewareTarget="WEBSITENAME1" applicationPoolTarget="AppPool1" />
      </deploymentNode>
    </deploymentTarget>
  </deploymentTargets>
</deploymentModel>
